<%--
  Created by IntelliJ IDEA.
  User: 30890
  Date: 2023/4/18
  Time: 18:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        #content {
            width: 700px;
            height: 70px;
            border: grey 1px solid;
            margin: 0px auto;
            padding: 10px;
            display: flex;
            justify-content: flex-end;
            align-items: center;
            background-color: #fff;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-radius: 5px;
        }

        #content input[type="text"] {
            height: 35px;
            width: 500px;
            font-size: 18px;
            color: darkslateblue;
            border: grey solid 1px;
            border-radius: 5px;
            padding: 0 10px;
        }

        #content input[type="submit"] {
            height: 35px;
            margin-left: 10px;
            padding: 0 20px;
            font-size: 18px;
            color: #fff;
            background-color: #4CAF50;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        #content input[type="submit"]:hover {
            background-color: #45a049;
        }

        table {
            width: 1300px;
            border-collapse: collapse;
            background-color: #fff;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-radius: 5px;
            overflow: hidden;
        }

        table, th, td {
            border: 1px solid #ddd;
        }

        th, td {
            padding: 12px;
            text-align: center;
        }

        th {
            background-color: #f2f2f2;
        }

        tr:nth-child(even) {
            background-color: #f9f9f9;
        }

        tr:hover {
            background-color: #f1f1f1;
        }

        img {
            cursor: pointer;
        }

    </style>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
</head>
<body>
<table border="1" cellspacing="0" align="center" class="con-b">
    <thead>
    <tr class="row" style="color: black;font-size: 25px">
        <td class="lf">任务账户</td>
        <td class="lf">任务名称</td>
        <td class="lf">任务时间</td>
        <td class="lf">删除题目</td>
        <td class="lf">查看详细</td>
    </tr>
    </thead>
    <tbody>

    <c:forEach items="${arr}" var="task">
        <tr>
            <td class="lf">${task.getTaskAccount()}</td>
            <td class="lf">${task.getTaskName()}</td>
            <td class="lf">${task.getTaskDate()}</td>
            <td class="lf"><img src="del.png" onclick="deleteTishTask('${task.getTaskAccount()}')"></td>
            <td class="lf"><img style="width: 40px;height: 40px" src="detail.jpg" onclick="skimDetail('${task.getTaskAccount()}')"></td>
        </tr>
    </c:forEach>

    </tbody>

</table>

</body>
</html>

<script>
    function deleteTishTask(taskAccount) {
        window.location.href = "tea.action?action=deleteTishTask&taskAccount="+taskAccount;
    }


    function skimDetail(taskAccount) {
        //查看这个任务的学生完成情况
        window.location.href = "tea.action?action=goSkimDetail&taskAccount="+taskAccount;
    }
</script>

